package com.woniu.dao;

import com.woniu.entity.CreRefund;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: Canaan
 * @description
 * @date: 2022/9/24 15:24
 */
public interface CreditRefundDao {

    /**
     * 查找还款表
     *
     * @return
     */
    List<CreRefund> findAllRefund(CreRefund creRefund);

    /**
     * 查询指定还款数据
     *
     * @param orderId
     * @return
     */
    CreRefund getRefund(@Param("orderId") int orderId);

    /**
     * 还款
     *
     * @param creRefund
     * @return
     */
    int repayment(CreRefund creRefund);

    String checkEmailByUserId(int userId);

    CreRefund sendEmail(CreRefund creRefund);

    CreRefund getRefundById(int refundId);

    //AUTHOR:李敬，增加还款数据
    int addRefund(CreRefund creRefund);

    int isOutTime();

    int updateRefStatus();

    int isFinish();

    int updateRefFinStatus();

    CreRefund getRefundByOrderId(Integer orderId);
}
